import { lazy } from 'react';

import { ROUTE_MAP } from '@/application/constants/routerMap';
import NotFound from '@/pages/404';

const Test = lazy(() => import('@/pages/Test'));

const Home = lazy(() => import('@/pages/Home/index'));

const AwardList = lazy(() => import('@/pages/AwardList'));

const Invitee = lazy(() => import('@/pages/Invitee'));

const ExchangeProduct = lazy(() => import('@/pages/AwardList/components/ExchangeProduct'));

export const routers = [
  {
    path: ROUTE_MAP.HOME,
    element: Home,
    auth: false,
    meta: {
      title: '集拼图赢好礼'
    }
  },
  {
    path: ROUTE_MAP.AWARD_LIST,
    element: AwardList,
    auth: false,
    meta: {
      title: '已获奖励'
    }
  },
  {
    path: ROUTE_MAP.INVITEE,
    auth: false,
    meta: {
      title: '集拼图赢好礼'
    },
    element: Invitee
  },
  {
    path: ROUTE_MAP.EXCHANGE_PRODUCT,
    auth: false,
    meta: {
      title: '集拼图赢好礼'
    },
    element: ExchangeProduct
  },
  { path: 'test', auth: false, meta: { title: 'test' }, element: Test },
  { path: '*', element: NotFound, auth: false }
];
